<template>
  <el-dialog
    v-model="dialogFormVisible"
    title="修改员工信息"
    :destroy-on-close="true"
  >
    <StaffFrom ref="modFrom" :changeV="changeDialogFormVisible"></StaffFrom>
  </el-dialog>
</template>

<script setup>
import { ref, defineExpose } from 'vue'
import { useStore } from 'vuex'
import StaffFrom from '@/components/StaffFrom'
const store = useStore()
const { commit } = store
const dialogFormVisible = ref(false)
// 修改dialogFormVisible
const changeDialogFormVisible = () => {
  dialogFormVisible.value = !dialogFormVisible.value
}
commit('staff/SAVEADDORMOD', false)
// 修改子组件addOrMod
defineExpose({ changeDialogFormVisible })
</script>

<style lang="scss" scoped>
.el-button--text {
  margin-right: 15px;
}
.el-select {
  width: 300px;
}
.el-input {
  width: 300px;
}
.dialog-footer button:first-child {
  margin-right: 10px;
}
</style>
